﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace University.Workshop.Presenters.Kardex.Show
{
    public class PresenterFirstStepForShowKardex
    {
        private IFirstStepForShowKardex view;

        public PresenterFirstStepForShowKardex(IFirstStepForShowKardex View)
        {
            view = View;
        }

        public void ChargePhonesToList()
        {
            view.PersonPhones = view.KardexToShow.Person.Phone.Split(',').ToList().Where(x => x != string.Empty).ToList();
        }
        
        public void UpdatePersonData()
        {
            view.PersonId = view.KardexToShow.Person.PersonId;
            view.PersonNames = view.KardexToShow.Person.Names;
            view.PersonLastNames = view.KardexToShow.Person.LastNames;
            ChargePhonesToList();
        }
    }
}
